﻿@model iBookstore.Models.Book
@{
    ViewBag.Title = "Book - " + Model.Title;
 }
<h2>@Model.Title</h2>
<p>
    <img alt="@Model.Title" src="@Model.BookArtUrl" />
</p>
<div id="book-details">
    <p>
        <em>Genre:</em>
        @Model.Genre.Name
    </p>
    <p>
        <em>Author:</em>
        @Model.Author.Name
    </p>
    <p>
        <em>Price:</em>
        @String.Format("{0:F}", Model.Price)
    </p>
    <p>
        <em>In stock:</em>
        @Model.Quantity
    </p>
    <p class="button">
        @if(Model.Quantity != 0) {
            @Html.ActionLink("Add to cart", "AddToCart", "Cart", new { id = Model.BookId }, "")
        }
    </p>
    <p class="notice">It's not possible to order if the product is not in stock.</p>
</div>